Oracle
merge into 标签描述

问题概述 某客户因为如下一条语句发生大量的enq:SQcontention等待事件,引发了生产事件: mergeintot_tarusing(selectcount()cntfromt_tarwherename=:1)Gon(G.cnt>0) whennotmatchedtheninsert(id,name,type)values(tseq.nextval,:1,'S'); DBA在对该问题分析过程如下:1)通过分析该SQL历史执行状态,判断该SQL已经在多天前就发现了sequence的争用;2)对出现问题的当天检查该SQL的并发频率,并发频率在20次-100次/10s,2-10次...